package com.bwie.controller;

import com.bwie.service.TbRegionService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @projectName: school2211a
 * @package: com.bwie.controller
 * @className: IndexController
 * @author: 杨珂
 * @description: TODO
 * @date: 2025/6/22 20:23
 * @version: 1.0
 */
@RestController
@RequestMapping("/dict/index")
public class IndexController {


    @Autowired
    TbRegionService tbRegionService;

    @PostMapping("/getRegionByPid")
    public R getRegionByPid() {
        return tbRegionService.getRegionByPid();
    }


    @PostMapping("/getRegionById/{id}")
    public R getRegionById(@PathVariable("id") Integer id) {
        return tbRegionService.getRegionById(id);
    }


}
